package com.ericsson;

import com.ericsson.common.quartz.job.MainJob;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

import javax.annotation.Resource;

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class CmatApplication implements CommandLineRunner {

    @Resource(name = "vgcEbmLogJob")
    private MainJob mainJob;

    public static void main(String[] args) {
        SpringApplication.run(CmatApplication.class, args);
    }

    @Override
    public void run(String... args) {
        mainJob.doTask();
    }
}
